package cn.fl.carloan.transform;

import java.util.ArrayList;
import java.util.List;

import cn.cmm.base.framework.utils.CollectionUtils;
import cn.fl.carloan.transform.base.BaseOdrCarValRecordVOTransform;
import cn.fl.carloan.vo.OdrCarValRecordVO;
import fl.carloan.facade.carloan.dto.OdrCarValRecordDTO;


 /**
 * @Description: 线索用户车辆估值记录表 转换器
 * @Description: VO是客户端传递数据到服务端进行转换的数据 
 * @Description: VO转换数据变成DTO传递到服务端 
 * @Description: VO不能在服务端出现
 */
public class OdrCarValRecordVOTransform extends BaseOdrCarValRecordVOTransform{


	/**
	 * DTO 转  VO
	 * @param po OdrCarValRecordDTO
	 * @return OdrCarValRecordVO
	 */
	public static OdrCarValRecordVO toVO(OdrCarValRecordDTO dto) {
		OdrCarValRecordVO  vo = baseToVO(dto);
		//设置自定义扩展属性
		return vo;
	}

	/**
	 * VO 转 DTO
	 * @param dto OdrCarValRecordVO
	 * @return OdrCarValRecordDTO
	 */
	public static OdrCarValRecordDTO toDTO(OdrCarValRecordVO vo) {
		OdrCarValRecordDTO dto = baseToDTO(vo);
		//设置自定义扩展属性
		return dto;
	}
	
	/**
	 * DTO集合 转 VO集合
	 * @param List<OdrCarValRecordDTO>
	 * @return List<OdrCarValRecordVO>
	 */
	public static List<OdrCarValRecordVO> toVOList(List<OdrCarValRecordDTO> list) {
		List<OdrCarValRecordVO>  voList = new ArrayList<OdrCarValRecordVO>();
		if(CollectionUtils.isNotEmpty(list)){
			for (OdrCarValRecordDTO dto : list) {
				voList.add(toVO(dto));
			}
		}
		return voList;
	}
	
	/**
	 * VO集合 转 DTO集合
	 * @param list List<OdrCarValRecordVO>
	 * @return List<OdrCarValRecordDTO>
	 */
	public static List<OdrCarValRecordDTO> toDTOList(List<OdrCarValRecordVO> list) {
		List<OdrCarValRecordDTO>  dtoList = new ArrayList<OdrCarValRecordDTO>();
		if(CollectionUtils.isNotEmpty(list)){
			for (OdrCarValRecordVO vo : list) {
				dtoList.add(toDTO(vo));
			}
		}
		return dtoList;
	}
}
